package com.itheima.static_case.Demo3;

public class ClassRoom {
    static int count;

    private String name;

    static {
        // 静态代码块
        System.out.println("这里是静态代码块...");
        System.out.println("当前 count " + count);
    }

    {
        // 实例代码块
        System.out.println("这里是实例代码块，创建实例时执行.");
        System.out.println("当前 name: " + name);
    }

    public ClassRoom() {
    }

    public ClassRoom(String name) {
        this.name = name;
    }

    public static int getCount() {
        return count;
    }

    public static void setCount(int count) {
        ClassRoom.count = count;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
